//
//  snake.h
//  Snake
//
//  Created by 李毅 on 16/9/18.
//  Copyright © 2016年 李毅. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Node.h"
@interface snake : NSObject

@property NSMutableArray *body;//list of nodes..
@property int dirct;//1,2,3,4
@property Node *header;
@property int pre_direct;
@property void (^moveFinishBlock)();
@property NSTimer *timer;

@property BOOL live;

@property Node *tail;

-(id) initWithXY:(int)x:(int)y;


-(void) grow;

-(void) destory;

-(void) changeD:(int) direct;

-(void)start;

-(void) move;

-(void) reset;


@end
